<template>
    <el-card shadow="always" :body-style="{ padding: '20px' }">
        <el-tabs v-model="currentTabs">
            <el-tab-pane label="供应列表" name="data">
                <supply-data></supply-data>
            </el-tab-pane>
            <el-tab-pane label="供应添加" name="add">
                <supply-add></supply-add>
            </el-tab-pane>
            <el-tab-pane label="供应信息修改" name="edit" v-if="showEdit">
                <supply-edit></supply-edit>
            </el-tab-pane>
        </el-tabs>
    </el-card>
    
</template>

<script>
import { mapState } from 'vuex'
import SupplyAddVue from './SupplyAdd.vue'
import SupplyEditVue from './SupplyEdit.vue'
import SupplyTable from './SupplyTable.vue'


export default {
    name: "Supply",
    data(){
        return {
            
        }
    },
    components: {
        'supply-data': SupplyTable,
        'supply-add': SupplyAddVue,
        'supply-edit': SupplyEditVue,
    },
    computed: {
        ...mapState('as', [
            'currentTabs',
            'showEdit',
        ])
    }
}
</script>